{% extends "layout.html" %}

{% load static %}
{% block css %}
    <link href="{% static '/plugins/bootstrap-4.6.2-dist/css/bootstrap-datepicker.min.css' %}" rel="stylesheet"/>
{% endblock %}

{% block content %}
    <div class="container">
        <h1>modelform新增员工信息</h1>
    </div>
    <div class="container">
        <form class="form" method="post" novalidate>
            {% csrf_token %}
            {% for field in form %}
                <div>
                    <label>{{ field.label }}</label>{{ field }}
                </div>
                <span style="color: red">{{ field.errors.0 }}</span>
            {% endfor %}
            <div class="form-group col-md-6">
                <button type="submit" class="btn btn-primary btn-sm ">提交</button>
            </div>
        </form>
    </div>
{% endblock %}

{% block js %}
    <script src="{% static '/js/moment-with-locales.min.js' %}"></script>
    <script src="{% static '/plugins/bootstrap-4.6.2-dist/js/bootstrap-datepicker.min.js' %}"></script>
    <!--中文语言包扩展-->
    <script src="{% static '/plugins/bootstrap-4.6.2-dist/js/bootstrap-datepicker.zh-CN.js' %}"></script>
    <script>
        $('#id_create_time').datepicker({
            format: "yyyy-mm-dd",
            weekStart: 1,
            daysOfWeekHighlighted: "6,0",
            autoclose: true,
            todayHighlight: true,
            language: "zh-CN",
        });

    </script>
{% endblock %}